﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using haptic.src.engine.debug;
using haptic.src.engine.render;
using haptic.src.engine.core;

namespace haptic.src.engine
{
    [Serializable]
    public class Component
    {
        public Component() {}
        public Component(Entity oOwner)
        {
            Debug.Assert(oOwner != null);
            m_oEntity = oOwner;
        }
        public virtual void Init(Scene oScene){}
        public virtual Result PreLoad(Scene oScene) { return Result.Success; }
        public virtual Result Load(Scene oScene, ContentManager oContent) { return Result.Success; }
        public virtual Result PostLoad(Scene oScene) { return Result.Success; }
        public virtual void Unload(Scene oScene) {}
        public virtual void Start() {}
        public virtual void Update(GameTime oTime){}
        public virtual void PostUpdate(GameTime oTime){}
        public virtual void Draw(Renderer oRenderer, GameTime oTime) {}
        public virtual void DrawDebug(DebugRenderer oDebugRenderer, GameTime oTime) { }
        protected Entity m_oEntity;
    }
}
